/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ez2find.model;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 *
 * @author Owner
 */
@NamedQueries(value={@NamedQuery(name="listAllGigs", query="SELECT g FROM Gig g"),
                     @NamedQuery(name="lastGigCode", query="SELECT MAX(g.code) FROM Gig g")})

@Entity
public class Gig extends Post implements Serializable{

    private String payType;
    private String compensation;
    //Permissions
    private boolean othersContact;
    @ManyToOne()
    private GigCategorie gigCategorie;
    
    public String getCompensation() {
        return compensation;
    }

    public void setCompensation(String compensation) {
        this.compensation = compensation;
    }

    public boolean isOthersContact() {
        return othersContact;
    }

    public void setOthersContact(boolean othersContact) {
        this.othersContact = othersContact;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public GigCategorie getGigCategorie() {
        return gigCategorie;
    }

    public void setGigCategorie(GigCategorie gigCategorie) {
        this.gigCategorie = gigCategorie;
    }
    
}
